package com.ikingtech.platform.service.system.post.configuration;

import com.ikingtech.framework.sdk.component.api.CompPostApi;
import com.ikingtech.platform.service.system.post.service.CompPostService;
import com.ikingtech.platform.service.system.post.service.PostService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author tie yan
 */
@Configuration
public class CompPostConfiguration {

    @Bean
    @ConditionalOnMissingBean({CompPostApi.class})
    public CompPostApi compPostApi(PostService service) {
        return new CompPostService(service);
    }
}
